package com.oa.system.entity;


import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 流程节点表
 * </p>
 *
 * @author syb123
 * @since 2019-01-29
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("sys_approval_node")
@ApiModel(value = "流程节点表")
public class ApprovalNode extends Model<ApprovalNode> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "节点方案表id")
    private Long approvalPlanId;

    @ApiModelProperty(value = "节点名称")
    private String nodeName;

    @ApiModelProperty("抄送人(1-审批人 2-抄送人)")
    private Integer type;

    @ApiModelProperty(value = "审批人类型（1-主管 2-指定用户）")
    @NotNull(message = "流程节点对象<审批人类型>字段<handlerType>不能为空！")
    private Integer handlerType;

    @ApiModelProperty(value = "主管（1-直接主管 2-二级主管）")
    private Integer governor;

    @ApiModelProperty(value = "排序")
    private Integer sort;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}